<template>
  <el-menu
    default-active="8"
    @select="select"
    background-color="#545c64"
    text-color="#fff"
    active-text-color="#ffd04b">
    <el-menu-item index="1">
      <i class="el-icon-table-lamp"></i>
      <span slot="title">zspt 校园路灯 (柱状、环形饼图)</span>
    </el-menu-item>
    <el-menu-item index="2">
      <i class="el-icon-s-platform"></i>
      <span slot="title">知信楼 F214 (散点图、仪表盘)</span>
    </el-menu-item>
    <el-menu-item index="3">
      <i class="el-icon-magic-stick"></i>
      <span slot="title">北区创新楼8楼空调 (关系图)</span>
    </el-menu-item>
    <el-menu-item index="4">
      <i class="el-icon-s-marketing"></i>
      <span slot="title">zspt 单相电表 (折线图)</span>
    </el-menu-item>
    <el-menu-item index="5">
      <i class="el-icon-s-operation"></i>
      <span slot="title">zspt 三相电表 (堆叠面积图)</span>
    </el-menu-item>
    <el-menu-item index="6">
      <i class="el-icon-s-opportunity"></i>
      <span slot="title">zspt 照明灯各区统计(雷达图)</span>
    </el-menu-item>
    <el-menu-item index="7">
      <i class="el-icon-s-promotion"></i>
      <span slot="title">中国地图</span>
    </el-menu-item>
    <el-menu-item index="8">
      <i class="el-icon-s-data"></i>
      <span slot="title">campus 总览</span>
    </el-menu-item>
  </el-menu>
</template>

<script>
export default {
  name: 'navMenu',
  props: {
    isShow: Boolean
  },
  methods: {
    select(key, keyPath) {
      this.$bus.$emit('navMenus',key);
    },
    beforeDestroy() {
      this.$bus.$off('navMenus') //解绑navMenu事件
    }
  }
}
</script>
